package com.zhoug.demo.player;

import android.app.Dialog;
import android.content.Context;

import com.zhoug.common.utils.StringUtils;
import com.zhoug.zmui.list.ZMUISelectionListDialog;

import java.text.MessageFormat;

import androidx.annotation.NonNull;

/**
 * @author: zhoug
 * @since: 2025-06-25
 */
public class MonitorDialog  extends ZMUISelectionListDialog<Monitor> {

    public MonitorDialog(@NonNull Context context) {
        super(context);
        setFullWidth(true);
    }

    @Override
    public String getItemName(Monitor itemData) {
        String url = itemData.getUrl();
        return MessageFormat.format("{0}({1})",
                itemData.getName(),
                StringUtils.isNullOrEmpty(url)?"ID":"URL");
    }


}
